home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19990725-20000114
/
000174_news@columbia.edu _Sat Oct 9 12:54:53 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA05259
for <kermit.misc@watsun.cc.columbia.edu>; Sat, 9 Oct 1999 12:54:53 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id MAA05434
for kermit.misc@watsun.cc.columbia.edu; Sat, 9 Oct 1999 12:54:08 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: login prompt problem
Date: 9 Oct 1999 16:54:07 GMT
Organization: Columbia University
Message-ID: <7tnrvf$59n$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <7tlv28$crs$1@nnrp1.deja.com>, <a_ppi_s@my-deja.com> wrote:
: Whats the difference between the two?
:
: I'm trying to write a simple script that will login to
: a unix machine by dialing in using kermit:
: (OS used Linux C-Kermit 7.0.195 )
: the login prompts are as follows:
:
: when I dial in using this script below,
: I am able to login manually without a problem (after commenting out the
: input/ output lines)
:
: But, when attempting to login automatically with the script below, I am
: not able to anticipate the correct login sequence.
:
: OK, here is a sample of a correct login session ( done manually )
: ~~~~~~~~~~~~~~~~~~~~
: 0068HWR
:
: Host Name: aAnNdDyY
:
: UIC: pPaAsSsSwWoOrRdD
:
:
: Connected to 0138 CDD-RTT1
: ^L
: ~~~~~~~~~~~~~~~~~
:
: #!/home/andy/kermit/wermit +
: set line /dev/modem
: set carrier-watch off
: set speed 9600
: set flow-control rts/cts
: set stop-bits 1
: set parity even
: set command bytesize 7
: set duplex half
: set terminal echo local
: set terminal cr-display normal
: set session log text
: log session
: set modem type gen
: set input echo on
: set input timeout proceed
: dial 9,5551212
: output \13
: pau 3
: ;input 5 ame:
: ;output Andy\13
: ;input 5 UIC:
: ;output password\13
:
: ~~~~~~~~~~~~~~~
:
: Now, when I uncomment the lines above, It is not able to sense
: the correct login prompts,
: Obviously I'm missing something here. Any ideas?
:
I suspect that sometimes you might have to send more than one carriage
to get the prompt. Try it this way:
set input echo on ; So you can watch what happens
dial 9,5551212 ; Dial the number
if fail exit 1 Call failed ; Make sure the call was completed
for \%i 1 5 1 { ; Try 5 times to get a prompt
output \13 ; Send CR
input 5 ame: ; Wait 5 sec for prompt
if fail continue ; If it doesn't come try again
output Andy\13 ; Send name + CR
input 10 UIC: ; Wait for next prompt
if fail exit 1 No UIC prompt ; Make sure it comes
output password\13 ; Send password + CR
}
: Also,
: How do is send the following characters:
:
: 1.) CNTRL + S
:
If this is for flow control purposes, your script shouldn't send it -- the
underlying terminal driver should. But you are using rts/cts, so I guess
it's not for flow control? (What's it for?) In any case:
output \19
: 2.) CNTRL + J ( or line feed )
output \10
- Frank